In this scenario, the app will subscribe to events so that it can respond to the actions a user takes with a toast.

When users click on your toast, dismiss it, or the toast times out, events are raised. You can attach listeners for these events to the toast object.

In addition, you can listen to the "activated" event from either the toast object or the Windows.UI.WebUI.WebUIApplication object to tell if the user clicked on your toast. The difference is that the WebUIApplication event is raised by toasts that arise from either local or push notifications, while the toast object event is raised only by local notifications.

You can also include a context in the toast notification payload that is specific to your app. This context can be accessed by your app when your app is activated from the toast notification. The context information included in the toast should be used to inform your app what action to take when it is launched through the toast. For example, if the toast represents a breaking news article in a news app, the context information in the toast should provide enough information so that the app can take the user directly to that story.



Whatever action you take on the displayed toast will be displayed here